<?php

/**
 * @author Eureka
 */
class ShopContacts extends CActiveRecord
{

	const IM_YAHOO = 1;
	const IM_GTALK = 2;

	public static function model($className = __CLASS__)
	{
		return parent::model($className);
	}

	public function tableName()
	{
		return 'shop_contacts';
	}

	public function findByShopId($shop_id)
	{
		$criteria = new CDbCriteria();
		$criteria->addCondition('shop_id= :shop_id');
		$criteria->params = array(':shop_id' => $shop_id);
		$shop_contacts = $this->findAll($criteria);
		return $shop_contacts;
	}

}